<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>js原型对象学习</title>
</head>
<body>
    
</body>
<script>
    Object.prototype.ltkzs='李彤康';
    let a= {a:1};
    console.log('aaa',a);
    
    let personPrototype = {
    sayHello: function() {
        console.log("Hello, my name is " + this.name);
    }
};

let alice = Object.create(personPrototype);
alice.name = "Alice";
alice.sayHello(); // 输出: Hello, my name is Alice
console.log('alice',alice);
    
</script>
</html>